package kr.hkit.powerjava.chapter22.collection;

import java.util.*;


public class LinkedListTest {
	public static void main(String[] args) {
		List<String> arList = new LinkedList<>();
		arList.add("MILK");
		arList.add("BREAD");
		arList.add("BUTTER");
		
		arList.add(1,"apple");
		arList.set(2,"grape");
		
		String temp = arList.remove(0);
		System.out.println("제거된 문자열 : " + temp);
		
		Collections.sort(arList);
		
		for(String str : arList)
			System.out.println(str);
	}
}
